<?php
/**
 * Auction:SelfController.php
 * @author qqinxl
 * Mon Aug 27 12:20:18 GMT 2007
 * 
 * @category   Auction
 * @package  
 * @copyright  Copyright (c) qqinxl
 */

class Admin_SelfController extends ControllerAction_Abstract   {
	
	public function passwordAction(){
		$id = $this->_loginUser->id;
		$form = new Form_User_Password ( );
		$form->setAttrib ( 'action', $this->_pageInfo->getCurrentUrl () . '/id/' . $id );
		
		$options[ActionHelper_ActionConfirm::OPTIONS_FORM] = $form;
		$options[ActionHelper_ActionConfirm::OPTIONS_INIT_OBJECT] = $this->_loginUser;
		$options[ActionHelper_ActionConfirm::OPTIONS_MODULE_SELECT] = Module_Impl_User_Select::getInstance();
		$options[ActionHelper_ActionConfirm::OPTIONS_MODULE_OPRATION] = Module_Impl_User_Opration::getInstance();
		$options[ActionHelper_ActionConfirm::OPTIONS_CONFIRM_FIELD] = 'password';
		
		$this->_helper->actionConfirm->setOptions ( $options );
		$this->_helper->actionConfirm->process ();
	}
	public function editAction() {
		$id = $this->_loginUser->id;
		$form = new Form_User_EditInfo ( );
		$form->setAttrib ( 'action', $this->_pageInfo->getCurrentUrl () . '/id/' . $id );
		
		$options[ActionHelper_ActionPost::OPTIONS_FORM] = $form;
		$options[ActionHelper_ActionPost::OPTIONS_INIT_OBJECT] = $this->_loginUser;
		$options[ActionHelper_ActionPost::OPTIONS_MODULE_SELECT] = Module_Impl_User_Select::getInstance();
		$options[ActionHelper_ActionPost::OPTIONS_MODULE_OPRATION] = Module_Impl_User_Opration::getInstance();
		$options[ActionHelper_ActionPost::OPTIONS_I18NMSG_TRANSLATEARRAY] = array ('p' => 'username', 'email' => 'email' );
		
		$this->_helper->actionPost->setOptions ( $options );
		$this->_helper->actionPost->process ();
	}
	
}